/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.ufc.quixada.comandos;

import br.com.ufc.quixada.interfaces.Comando;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 *
 * @author Administrator
 */
public class CmdLogoff implements Comando {
   
    @Override
    public String executa(HttpServletRequest request, HttpServletResponse response) {
        HttpSession session = request.getSession(true);
        session.removeAttribute("user");
        session.setAttribute("sucesso", "Logoff efetuado com Sucesso!!");
        return "/index.jsp";
    }

}
